#pragma once
#include "CBase.h"
#include "CAnimation.h"
class CAnimationManager;

class CEmitter;

class CPlayer :public CBase
{
	int m_nPower;
	float m_fRange;
	int m_nSpeed;
	int m_nMaxHP;
	int m_nCurrHP;
	////////////////////////
	//	
	float m_fElapsedTime;
	float m_fElapsedTime2;
	float m_fElapsedTime3;
	float m_fElapsedTime4;
	//
	////////////////////////

	bool m_bIsFlipped;
	bool IsAttracting;
	bool IsRunning;
	Animations m_pAPlayer;
	CAnimationManager* m_pAnimate;
	/////////////////////////
	//
	CEmitter* pEmitter;
	CEmitter* pEmitterRed;
	CEmitter* pEmitterGreen;
	CEmitter* pEmitterYellow;
	CEmitter* pEmitterBlue;
	//
	////////////////////////

	////////////////////////////////////////////////////////////////////////////////////////
	//	Proper singleton:
	//	Constructor
	CPlayer();
	//	Trilogy of Evil:
	//		Copy constructor
	CPlayer(const CPlayer&);
	//		Assignment Operator
	CPlayer& operator=(const CPlayer&);
	//		Destructor
	~CPlayer();
	//
	////////////////////////////////////////////////////////////////////////////////////////
public:

	////////////////////////////////////////////
	//	Accessors/mutators
	int GetPower() {return m_nPower;}
	float GetRange() {return m_fRange;}
	int GetSpeed() {return m_nSpeed;}
	int GetMaxHP() {return m_nMaxHP;}
	int GetCurrHP() {return m_nCurrHP;}
	bool GetAttracting() {return IsAttracting;}
	bool GetIsRunning() {return IsRunning;}
	CEmitter* GetBlue() {return pEmitterBlue;}
	CEmitter* GetGreen() {return pEmitterGreen;}
	CEmitter* GetRed() {return pEmitterRed;}
	CEmitter* GetYellow() {return pEmitterYellow;}
	void SetPower(int Power) {m_nPower = Power;}
	void SetRange(float Range) {m_fRange = Range;}
	void SetMaxHP(int Max) {m_nMaxHP = Max;}
	void SetCurrHP(int Curr) {m_nCurrHP = Curr;}
	void SetSpeed(int nSpeed) {m_nSpeed = nSpeed;}
	//
	//////////////////////////////////////////////

	void Update(float fDelta);
	void Input();
	void Render();
	static CPlayer* GetInstance();
	void HandleEvent(CEvent* pEvent);
	bool Collision(CBase* pBase);
};
